package com.net.service;

import java.util.List;

import com.net.model.Commodity;

public interface CommodityService {

	public abstract void add(Commodity u) throws Exception;

	public abstract List<Commodity> getCommodities() throws Exception;
	
	public Commodity loadCommodityById(int id);
	
	public boolean delete(Commodity u);
	
	public void update(Commodity commodity);
	
	public List<Commodity> searchList(Commodity commodity);
	
	public int getCount();
	
	public Commodity loadCommodityByName(String name) throws Exception;
	
	public List<Commodity> getCommodities(final int currentPage,final int perPage,final String orderType,final String orderName);
	/**
	 * 条件查询列表
	 * @param currentPage
	 * @param perPage
	 * @param condition查询条件
	 * @return
	 */
	public List<Commodity> getCommoditiesByCondition(final int currentPage,final int perPage,final String condition);
}